package com.oms.app.shop.model;

import java.util.Date;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import com.oms.base.JSONDateTimeSerializer;
import com.oms.util.DataDeal;

/**
 * SHOP表对应实体
 * @author Loong_Mit
 * @date Sep 1, 2012 12:30:07 PM
 */
public class Shop {
	private Integer id;
	private String shopname = "";
	private String linkman = "";
	private String linkmanphone = "";
	private Date creatertime;
	private String shopaddress = "";
	private String keyworde = "";
	private Integer creator;
	private String creatorname = "";
	private int status = 0;
	private int source_from = 1;
	private String shopdesc = "";
	private String idcard = "";
	private int isordertime = 0;
	private Date order_begintime;
	private Date order_endtime;
	private int isadminonline = 1;
	private int islowestcost = 0;
	private String lowestcost = "0";
	private Integer address_id = -1;
	private String address_name = "";
	private Integer parentid = -1;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getShopname() {
		return shopname;
	}
	public void setShopname(String shopname) {
		this.shopname = shopname;
	}
	public String getLinkman() {
		return linkman;
	}
	public void setLinkman(String linkman) {
		this.linkman = linkman;
	}
	public String getLinkmanphone() {
		return linkmanphone;
	}
	public void setLinkmanphone(String linkmanphone) {
		this.linkmanphone = linkmanphone;
	}
	
	@JsonSerialize(using=JSONDateTimeSerializer.class) 
	public Date getCreatertime() {
		return creatertime;
	}
	public void setCreatertime(Date creatertime) {
		if (creatertime == null) {
			this.creatertime = new java.util.Date();
		}
		this.creatertime = creatertime;
	}
	public String getShopaddress() {
		return shopaddress;
	}
	public void setShopaddress(String shopaddress) {
		this.shopaddress = shopaddress;
	}
	public String getKeyworde() {
		return keyworde;
	}
	public void setKeyworde(String keyworde) {
		this.keyworde = keyworde;
	}
	public Integer getCreator() {
		return creator;
	}
	public void setCreator(Integer creator) {
		this.creator = creator;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	public int getSource_from() {
		return source_from;
	}
	public void setSource_from(int source_from) {
		this.source_from = source_from;
	}
	public String getCreatorname() {
		return creatorname;
	}
	public void setCreatorname(String creatorname) {
		this.creatorname = creatorname;
	}
	public String getShopdesc() {
		return shopdesc;
	}
	public void setShopdesc(String shopdesc) {
		this.shopdesc = shopdesc;
	}
	public String getIdcard() {
		return idcard;
	}
	public void setIdcard(String idcard) {
		this.idcard = idcard;
	}
	public int getIsordertime() {
		return isordertime;
	}
	public void setIsordertime(int isordertime) {
		this.isordertime = isordertime;
	}
	@JsonSerialize(using=JSONDateTimeSerializer.class) 
	public Date getOrder_begintime() {
		return order_begintime;
	}
	public void setOrder_begintime(Date order_begintime) {
		if (order_begintime == null) {
			this.order_begintime = DataDeal.ObjCDate("2012-01-01", "yyyy-MM-DD");
		} else {
			this.order_begintime = order_begintime;
		}		
	}
	@JsonSerialize(using=JSONDateTimeSerializer.class) 
	public Date getOrder_endtime() {
		return order_endtime;
	}
	public void setOrder_endtime(Date order_endtime) {
		if (order_endtime == null) {
			this.order_endtime = DataDeal.ObjCDate("2012-01-01", "yyyy-MM-DD");
		} else {
			this.order_endtime = order_endtime;
		}
	}
	public int getIsadminonline() {
		return isadminonline;
	}
	public void setIsadminonline(int isadminonline) {
		this.isadminonline = isadminonline;
	}
	public int getIslowestcost() {
		return islowestcost;
	}
	public void setIslowestcost(int islowestcost) {
		this.islowestcost = islowestcost;
	}
	public String getLowestcost() {
		return lowestcost;
	}
	public void setLowestcost(String lowestcost) {
		this.lowestcost = lowestcost;
	}
	public Integer getAddress_id() {
		return address_id;
	}
	public void setAddress_id(Integer address_id) {
		this.address_id = address_id;
	}
	public String getAddress_name() {
		return address_name;
	}
	public void setAddress_name(String address_name) {
		this.address_name = address_name;
	}
	public Integer getParentid() {
		return parentid;
	}
	public void setParentid(Integer parentid) {
		this.parentid = parentid;
	}
}